﻿using PeaceBlogData.Tables;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace PeaceBlog.Controllers.API
{
    public class UsersController : ApiController
    {
        private PeaceBlogData.PeaceBlogEntity db = new PeaceBlogData.PeaceBlogEntity();

        public Authors Login(string email, string password)
        {
            var pass = CrypterHelper.PasswordHash(password);
            return db.GetAuthorFromLogin(email, pass);
        }
    }
}
